/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.system.action.exam;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.springframework.web.util.HtmlUtils;
import cn.javaxc.system.mapper.exam.ExamPageMapper;
public class ExamPage extends BaseAction
{
    @Autowired(required=false)
	private ExamPageMapper mapper;
    
    protected Map<String, Object> getRequestData(HttpServletRequest request)
    {
        Map<String, Object> mapn = new HashMap();
        Map<String, String[]> map = request.getParameterMap();
        for (Map.Entry<String, String[]> entry : map.entrySet()) {
            String value = StringUtils.join((String[])entry.getValue(), ",");
            String nvalue = HtmlUtils.htmlEscape(value);
            mapn.put((String)entry.getKey(), nvalue);
        }
        return mapn;
    }
    
    /**
    */
    
    public SQLList s_question_db() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean(ExamPage.class,"s_db_treecols");
        tb.setPrefix("img");
        tb.setPrefix("");
        SQLList<SQLMap> s_db=mapper.s_db(params);
        s_db = s_db.buildTree(tb,tb.getPid());
        result.put("s_db", s_db);
        
        return s_db;
    }
}